package com.hzhq.contract.bean.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.Binary;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: hzhq1255
 * @mail: hzhq1255@163.com
 * @date: 2021/4/20 11:29
 * @desc:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("AttachmentDTO")
public class AttachmentDTO {


      @ApiModelProperty(value = "附件id")
      private String attachId;
      @ApiModelProperty(value = "所属合同")
      private String contractId;
      @ApiModelProperty(value = "附件名称")
      private String attachName;
      @ApiModelProperty(value = "文件md5值")
      private String md5;
      @ApiModelProperty(value = "文件大小")
      private Long size;
      @ApiModelProperty(value = "文件内容")
      private Binary content;
      @ApiModelProperty(value = "文件类型")
      private String contentType;
      @ApiModelProperty(value = "附件路径")
      private String path;
      @ApiModelProperty(value = "上传时间")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      private Date uploadTime;
      @ApiModelProperty(value = "删除")
      private Integer deleted;

}
